<?php


namespace app\controller;


use app\BaseController;

class Demo extends BaseController
{
    public function show(){
        $result = [
            'status'=>1,
            'msg'=>'ok',
            'result'=>[
                'id'=>1,
            ]
        ];
        $header = [
            'Token'=>"sjfondeullflfjus"
        ];
        return json($result,200,$header);
    }
    public function request(){
        // 第一种获取参数
        dump($this->request->param());
        dump($this->request->param("abc",2,'intval'));
    }
}